﻿

@using Single_SignOn.Models
@using Single_SignOn.ResX
@model IEnumerable<Single_SignOn.Areas.Web.Models.Language>
<table style="width: 100%;" class="center">
    <tr>
        <td style="width: 40%; vertical-align: middle;" class="right"><h4>@ResourceTools.GetResource("Resource", "Language") : </h4></td>
        <td style="width: 60%; vertical-align: middle;" class="left">@Html.DropDownList("Language", new SelectList(Model,"Name","Description",((UserProfile)Session["UserInfo"]).Language))</td>
    </tr>
</table>
<div class="display">
    <a id="urlLanguage" href="@Html.AttributeEncode(Url.Action("ChangeLanguage", "ApplicationList", new { language="",company=""}))" style="display:none;"></a>
    
    <script type="text/javascript">
        /**/
        $(document).ready(function () {
            var company = $("#Company").val();
            $('#Language').change(function () {
                document.location.href = $('#urlLanguage').attr('href') + "?language=" + $(this).val() + "&company=" + company;
            });
        }); 
    </script>
</div>
